

	<!-- 当前所在位置 START -->
	{include file="_url.here.tpl"}
	<!-- 当前所在位置 END -->

	<div class="space20"></div>

	<!-- 主体区 -->
	<div class="area">

		<!-- 用户注册 START -->
		<div class="sl_t_block bdcolor-olivine">
			<div class="tt">
				<h2 class="color-olivine">用户注册</h2>
			</div>
			<div class="main-block user-login-reg">
				
				<!-- 表单 START -->
				<div class="form-block">
					<form id="fm_register" action="./index.php?mdl=user&do=register" method="post" target="ajax">
						<input type="hidden" name="formAction" value="{$_act.mdl}_{$_act.do}" />

						<dl ><dt>&nbsp;</dt><dd><h2>用户注册</h2></dd><div class="clear"></div></dl>
						<dl ><dt>用户名：</dt><dd><input type="text" tabindex="1" name="username" value="" class="input" style="width:240px;" /></dd><div class="clear"></div></dl>
						<dl ><dt>密码：</dt><dd><input type="password" tabindex="2" name="password" value="" class="input" style="width:240px;" /></dd><div class="clear"></div></dl>
						<dl ><dt>确认密码：</dt><dd><input type="password" tabindex="3" name="password_confirm" value="" class="input" style="width:240px;" /></dd><div class="clear"></div></dl>
						<div class="space20"></div>
						<dl ><dt>邮箱：</dt><dd><input type="text" tabindex="4" name="email" value="" class="input" style="width:240px;" /></dd><div class="clear"></div></dl>
						<dl ><dt>昵称：</dt><dd><input type="text" tabindex="5" name="nickname" value="" class="input" style="width:240px;" /></dd><div class="clear"></div></dl>
						<dl ><dt>真实姓名：</dt><dd><input type="text" tabindex="6" name="realname" value="" class="input" style="width:240px;" /></dd><div class="clear"></div></dl>
						<dl ><dt>手机：</dt><dd><input type="text" tabindex="7" name="mobile" value="" class="input" style="width:240px;" /></dd><div class="clear"></div></dl>
						<dl ><dt>&nbsp;</dt><dd><input type="submit" tabindex="8" value="注册" class="btn-2th" /></dd><div class="clear"></div></dl>
					</form>
				</div>
				<!-- 表单 END -->

				<!-- 提示信息 START -->
				<div class="form-block">
					<ul class="single_line">
						<li><h2>已是{$_sysvars.shop_name}商城用户？</h2></li>
						<li><a href="./index.php?mdl=user&do=login"><b>现在去登录&gt;&gt;</b></a></li>
					</ul>
				</div>
				<!-- 提示信息 END -->
				
				<div class="clear"></div>
			</div>
		</div>
		<!-- 用户注册 END -->

	</div>

	

<script type="text/javascript" language="JavaScript" charset="utf-8">
<!-- 
	{literal}
	jQuery(function($){
		$('#fm_register').submit(function(evt){
			var username		= $.trim($(this).find('input[name="username"]').val());
			var nickname		= $.trim($(this).find('input[name="nickname"]').val());
			var realname		= $.trim($(this).find('input[name="realname"]').val());
			var email			= $.trim($(this).find('input[name="email"]').val());
			var mobile			= $.trim($(this).find('input[name="mobile"]').val());
			var password		= $.trim($(this).find('input[name="password"]').val());
			var password_confirm= $.trim($(this).find('input[name="password_confirm"]').val());

			var errmsg = [];
			if(username == '' || username.length < 2)errmsg.push('未输入用户名或少于2个字');
			//if(nickname == '' || nickname.length < 2)errmsg.push('未输入昵称或少于2个字');
			//if(realname == '' || realname.length < 2 || (new RegExp(regexEnum.chinese)).test(realname) == false)errmsg.push('未输入真实姓名或格式不正确');
			if(email == '' || email.length < 5 || (new RegExp(regexEnum.email)).test(email) == false)errmsg.push('未输入邮箱或格式不正确');
			//if(mobile == '' || mobile.length < 11 || (new RegExp(regexEnum.mobile)).test(mobile) == false)errmsg.push('未输入手机或格式不正确');
			if(password == '' || password.length < 6){
				errmsg.push('未输入密码或格式不正确');
			}else{
				if(password !== password_confirm){
					errmsg.push('两次输入的密码不一致');
				}
			}

			if(errmsg.length > 0){
				evt.iscancelled = true;	// 阻止其他事件
				errmsg = errmsg.join('<br />');
				showmsg_warning(errmsg, {title:'表单验证失败'});
				return false;
			}
			return true;
		});
	});

	function callback_register(params){
		if(params.result == 'succ'){
			params.url = params.url == '' ? './index.php?frm=user' : params.url;
			params.msg = params.msg || '注册成功';
		}
		callback_common(params);
	}
	{/literal}
//-->
</script>